package cn.gcjxsc.controller;

import cn.gcjxsc.service.integral.RedPackService;
import cn.gcjxsc.service.merchant.StoreSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author pumbaa
 * @since 1.0
 */
@RestController
public class DevController {
    @Autowired
    private StoreSettingService settingService;
    @Autowired
    private RedPackService redPackService;

    @RequestMapping("/dev")
    public void testRedis(String opt){
        Map<String, String> cacheSetting = settingService.findCacheSetting(1);
        System.out.println(cacheSetting);
    }

    @RequestMapping("/dev/update")
    public void updateSetting() {
        Integer storeId = 49;
        Map<String, String> data = new HashMap<>();

        settingService.saveOrUpdate(storeId, data);
    }

    @RequestMapping("/test/sendRedPack")
    public void testSendOrder(@RequestParam("sn") String sn) {

    }
}
